package com.api.service.v1;

import com.admin.entity.Station;
import com.admin.mapper.StationMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 站点管理
 */
@SuppressWarnings("ALL")
@Service
public class StationAPIService {

    @Autowired
     private StationMapper stationMapper;

    /**
     * 根据站点编号(非主键)查找站点对象
     * @param stationBH
     * @return
     */
    public Station getStationByBH(String stationBH)
    {
        QueryWrapper q = new QueryWrapper();
        q.eq("station_bh",stationBH);
        return stationMapper.selectOne(q);
    }

}
